﻿//using Psi.Core.Infrastructure;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Psi.Core.Models
{
    /// <summary>
    /// 广告
    /// </summary>
    [Table("Banner")]
    public class Banner : Entity
    {
        public Banner()
        {
            var dt = DateTime.Now;
            Status = 1;
            CatId = 0;
            Hits = 0;
            //Sort = DateHelper.DateTimeToStamp(dt);
            AddTime = dt;
            LastTime = dt;
        }
        public string Title { get; set; }
        public string Content { get; set; }
        public string Url { get; set; }
        public string Image { get; set; }
        /// <summary>
        /// 分类Id
        /// </summary>
        public int CatId { get; set; }
        /// <summary>
        /// 点击量
        /// </summary>
        [Display(Name = "点击量")]
        public int Hits { get; set; }
        /// <summary>
        /// 排序
        /// <remarks>默认0 越大越靠前</remarks>
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 状态 0 关闭 1 正常
        /// </summary>
        public int Status { get; set; }
        public DateTime AddTime { get; set; }
        public DateTime LastTime { get; set; }
        public virtual Category Category { get; set; }
    }
}
